Skip to content

TST: adding test for .describe() with duplicate columns #35424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 3, 2020

Conversation

smithto1
Copy link
Member

@smithto1 smithto1 commented Jul 27, 2020

While working on #35314 I made a change that broke GroupBy.apply if you called it on a DataFrame with duplicate columns; however, this break was not caught by any test. Was just caught on inpsection: #35314 (comment)

This PR is just to add a test for this case to ensure it works and doesn't break again in the future.

@simonjayhawkins simonjayhawkins added Apply Apply, Aggregate, Transform, Map Groupby Testing pandas testing functions or related to the test suite labels Jul 27, 2020
Copy link
Member

@arw2019 arw2019 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@simonjayhawkins
Copy link
Member

@smithto1 tests are failing

=========================== short test summary info ============================
FAILED pandas/tests/groupby/test_function.py::test_describe_with_duplicate_output_column_names[True]
FAILED pandas/tests/groupby/test_function.py::test_describe_with_duplicate_output_column_names[False]
=== 2 failed, 70016 passed, 4046 skipped, 1022 xfailed in 547.03s (0:09:07) ====

@simonjayhawkins simonjayhawkins added this to the 1.2 milestone Aug 3, 2020
@pep8speaks
Copy link

pep8speaks commented Aug 3, 2020

Hello @smithto1! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-08-03 20:58:22 UTC

@jreback jreback merged commit 969945e into pandas-dev:master Aug 3, 2020
@jreback
Copy link
Contributor

jreback commented Aug 3, 2020

thanks @smithto1 very nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apply Apply, Aggregate, Transform, Map Groupby Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TST: Add test for GroupBy.describe() with duplicate columns
5 participants